/**
 * 留言模型 
 * 
*/
module.exports = (sequelize, Sequelize) => {
    return sequelize.define("message", {
        id: {
            type: Sequelize.UUID,
            notNull: true,
            primaryKey: true,
            defaultValue: Sequelize.UUIDV4,
        },
        userId: {
            type: Sequelize.STRING,
            comment: '留言用户',
            field:'user_id'
        },
        nickname: {
            type: Sequelize.STRING,
            comment: '留言用户昵称',
        },
        eMail: {
            type: Sequelize.STRING,
            notNull: true,
            notEmpty: true,
            comment: '留言邮箱',
        },
        status: {
            type: Sequelize.BOOLEAN,
            comment: '回复状态',
            defaultValue: false
        },
        content: {
            type: Sequelize.TEXT("long"),
            comment: '留言内容',
        },
    })
}